Repository navigation
fix(fork): a provider crash wakes the agent once, through upstream's continuation - #63
Merged
Merged
Conversation
…continuation Upstream's provider-exit continuation (pingdotgg#40170) now wakes the agent after a provider crash, so the fork's release path wakes it only after an idle timeout. The fork still records the lost work for every release. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After upstream pingdotgg#40170, a provider crash with background work the agent waited on woke the agent twice: once through upstream's provider-exit continuation and once through fork #14's own continuation offer in
ProviderSessionManager.writeReleasedRosterEvents.The fork's release path now offers its wake only after an idle timeout, which upstream doesn't cover. After a crash, upstream's continuation is the only wake. The fork still records the lost work on the run for every release it handled before; upstream merges its own entries into that note without duplicates. The Claude query-exit wake in
ClaudeAdapterV2.finalizeActiveTurnAfterQueryExitstays, because a Claude query process exiting doesn't release the provider session, so upstream's path never runs for it. FORK.md's #14 line notes the handoff.Two crash cases no longer wake the agent, accepted as upstream's intended guards:
continueThreadsAfterServerUpdateturned off (it defaults to on), a crash records the lost work but sends no follow-up.The release-wake test now covers idle (fork wakes), crash (fork doesn't offer; upstream's continuation is queued) and settle (no wake). The crash case fails on main.
ProviderSessionManager.test.ts(77 tests) and the server typecheck pass. GPT Sol reviewed it and raised only the two cases above.Done by Claude Opus 5.5 in Claude Code.
🤖 Generated with Claude Code